﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="CompartmentMappingSchema" targetNamespace="http://schemas.microsoft.com/dsltools/CompartmentMapping" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/CompartmentMapping" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <!-- ExampleModel -->
  <xsd:element name="exampleModel" type="ExampleModel" />
  <xsd:complexType name="ExampleModel">
    <xsd:annotation>
      <xsd:documentation>The root in which all other elements are embedded. Appears as a diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: ExampleModelHasParent1 -->
      <xsd:element name="parent1" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of ExampleModelHasParent1</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="exampleModelHasParent1">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from ExampleModelHasParent1 needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="parent1" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <!-- Relationship: ExampleModelHasParent2 -->
      <xsd:element name="parent2" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of ExampleModelHasParent2</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="exampleModelHasParent2">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from ExampleModelHasParent2 needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="parent2" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Id -->
    <xsd:attribute name="Id" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <!-- dslVersion -->
    <xsd:attribute name="dslVersion" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- ExampleModel Moniker -->
  <xsd:element name="exampleModelMoniker" type="ExampleModelMoniker" />
  <xsd:complexType name="ExampleModelMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleModel instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="Id" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- Parent1 -->
  <xsd:element name="parent1" type="Parent1" />
  <xsd:complexType name="Parent1">
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: Parent1HasEntry1 -->
      <xsd:element name="entry1" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of Parent1HasEntry1</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="parent1HasEntry1">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from Parent1HasEntry1 needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="entry1" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <!-- Relationship: Parent1ReferencesParent2 -->
      <xsd:element name="parent2" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of Parent1ReferencesParent2</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element ref="parent1ReferencesParent2" minOccurs="0" maxOccurs="unbounded">
              <xsd:annotation>
                <xsd:documentation>[Instance of Parent1ReferencesParent2 needs to be serialized in full-form]</xsd:documentation>
              </xsd:annotation>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Property: Name -->
    <xsd:attribute name="name" type="xsd:string" use="required" />
  </xsd:complexType>
  
  <!-- Parent1 Moniker -->
  <xsd:element name="parent1Moniker" type="Parent1Moniker" />
  <xsd:complexType name="Parent1Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Parent1 instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- Parent2 -->
  <xsd:element name="parent2" type="Parent2" />
  <xsd:complexType name="Parent2">
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Relationship: Parent2HasEntry2 -->
      <xsd:element name="entry2" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Instances of Parent2HasEntry2</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="0" maxOccurs="unbounded" >
              <xsd:element ref="parent2HasEntry2">
                <xsd:annotation>
                  <xsd:documentation>[Relationship deriving from Parent2HasEntry2 needs to be serialized in full-form]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
              <xsd:element ref="entry2" >
                <xsd:annotation>
                  <xsd:documentation>[Target role-player]</xsd:documentation>
                </xsd:annotation>
              </xsd:element>
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <!-- Property: Name -->
    <xsd:attribute name="name" type="xsd:string" use="required" />
  </xsd:complexType>
  
  <!-- Parent2 Moniker -->
  <xsd:element name="parent2Moniker" type="Parent2Moniker" />
  <xsd:complexType name="Parent2Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Parent2 instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- Entry1 -->
  <xsd:element name="entry1" type="Entry1" />
  <xsd:complexType name="Entry1">
    <!-- Property: Name -->
    <xsd:attribute name="name" type="xsd:string" use="required" />
    <!-- Property: Guid -->
    <xsd:attribute name="guid" type="xsd:string" />
  </xsd:complexType>
  
  <!-- Entry1 Moniker -->
  <xsd:element name="entry1Moniker" type="Entry1Moniker" />
  <xsd:complexType name="Entry1Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Entry1 instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- Entry2 -->
  <xsd:element name="entry2" type="Entry2" />
  <xsd:complexType name="Entry2">
    <!-- Property: Name -->
    <xsd:attribute name="name" type="xsd:string" use="required" />
    <!-- Property: Guid -->
    <xsd:attribute name="guid" type="xsd:string" />
  </xsd:complexType>
  
  <!-- Entry2 Moniker -->
  <xsd:element name="entry2Moniker" type="Entry2Moniker" />
  <xsd:complexType name="Entry2Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Entry2 instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
  <!-- ExampleModelHasParent1 -->
  <xsd:element name="exampleModelHasParent1" abstract="true" type="ExampleModelHasParent1" />
  <xsd:complexType name="ExampleModelHasParent1" abstract="true" >
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Parent1 -->
      <xsd:element ref="parent1" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- ExampleModelHasParent1 Moniker -->
  <xsd:element name="exampleModelHasParent1Moniker" abstract="true" type="ExampleModelHasParent1Moniker" />
  <xsd:complexType name="ExampleModelHasParent1Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleModelHasParent1 instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
  <!-- ExampleModelHasParent2 -->
  <xsd:element name="exampleModelHasParent2" abstract="true" type="ExampleModelHasParent2" />
  <xsd:complexType name="ExampleModelHasParent2" abstract="true" >
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Parent2 -->
      <xsd:element ref="parent2" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- ExampleModelHasParent2 Moniker -->
  <xsd:element name="exampleModelHasParent2Moniker" abstract="true" type="ExampleModelHasParent2Moniker" />
  <xsd:complexType name="ExampleModelHasParent2Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExampleModelHasParent2 instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
  <!-- Parent1HasEntry1 -->
  <xsd:element name="parent1HasEntry1" abstract="true" type="Parent1HasEntry1" />
  <xsd:complexType name="Parent1HasEntry1" abstract="true" >
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Entry1 -->
      <xsd:element ref="entry1" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- Parent1HasEntry1 Moniker -->
  <xsd:element name="parent1HasEntry1Moniker" abstract="true" type="Parent1HasEntry1Moniker" />
  <xsd:complexType name="Parent1HasEntry1Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Parent1HasEntry1 instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
  <!-- Parent2HasEntry2 -->
  <xsd:element name="parent2HasEntry2" abstract="true" type="Parent2HasEntry2" />
  <xsd:complexType name="Parent2HasEntry2" abstract="true" >
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Entry2 -->
      <xsd:element ref="entry2" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
  
  <!-- Parent2HasEntry2 Moniker -->
  <xsd:element name="parent2HasEntry2Moniker" abstract="true" type="Parent2HasEntry2Moniker" />
  <xsd:complexType name="Parent2HasEntry2Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Parent2HasEntry2 instance.</xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  
  <!-- Parent1ReferencesParent2 -->
  <xsd:element name="parent1ReferencesParent2" type="Parent1ReferencesParent2" />
  <xsd:complexType name="Parent1ReferencesParent2">
    <xsd:sequence minOccurs="0" maxOccurs="1">
      <!-- Target end Parent2 -->
      <xsd:element ref="parent2Moniker" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>[Target role-player]</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <!-- Id -->
    <xsd:attribute name="Id" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <!-- Property: fromEntry -->
    <xsd:attribute name="fromEntry" type="xsd:string" />
    <!-- Property: toEntry -->
    <xsd:attribute name="toEntry" type="xsd:string" />
  </xsd:complexType>
  
  <!-- Parent1ReferencesParent2 Moniker -->
  <xsd:element name="parent1ReferencesParent2Moniker" type="Parent1ReferencesParent2Moniker" />
  <xsd:complexType name="Parent1ReferencesParent2Moniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Parent1ReferencesParent2 instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="Id" type="xsd:string" >
      <xsd:annotation>
        <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  
</xsd:schema>

